<template>
  <view class="container">
    <header class="headre">
      <swiper class="swiper" circular="true" autoplay="true" interval="2000" duration="1000">
        <block v-for="(item, index) in movies" :index="index" :key="item">
          <swiper-item>
            <image :src="item.url" class="slide-image" mode="aspectFill" />
          </swiper-item>
        </block>
      </swiper>
      <i-tabs active="current" color="#0064eb" @change="handleChange">
        <i-tab name="tab1" title="待上课">
          <div class="main">
            <div class="list" v-for="(item,index) in getschedule" :key="index">
              <view class="label bg-color-FF5033" v-show="isshow(newtime, index)">今天</view>
              <view class="label bg-color-FCAB37" v-show="isshow(forstime, index)">明天</view>
              <view class="list-header text-color-444547">{{ item[0].text }}</view>
              <view
                class="data-li"
                v-for="(v, idx) of item"
                :key="idx"
                style="display:flex;position: relative;"
                @click="upke(v.ID)"
              >
                <view class="lab bg-color-FF5033" v-show="v.type === '请假'">请假</view>
                <view style="flex:1;position: relative;margin:auto;">
                  <img
                    :src="v.img"
                    alt
                    style="width:100rpx;height:100rpx;top: 0;right: 0;bottom: 0;left: 0;margin: auto;"
                  />
                </view>
                <view style="flex:3.1;">
                  <view class="index-text" v-text="v.schoolclazz.name"></view>

                  <view style="display:flex;" class="text-color-939393">
                    <view style="flex:1.1;">{{v.schoolclasstime}}</view>
                    <view style="flex:1;text-align:center;">{{v.schoolclassroom.name}}</view>
                  </view>
                </view>
              </view>
            </div>
          </div>
        </i-tab>
        <i-tab name="tab2" title="已上课">
          <div class="main">
            <div class="list" v-for="(item,index) in getcalendar" :key="index">
              <view class="list-header text-color-444547">{{ item[0].text }}</view>
              <view
                class="data-li"
                v-for="(v, idx) of item"
                :key="idx"
                style="display:flex;position: relative;"
                @click="upke(v.schoolclazzscheduleid)"
              >
                <div class="lab bg-color-05A718" v-if="!v.state">已点评</div>
                <div class="lab bg-color-05A718" v-else v-text="v.type==='其他'?'补课':v.type"></div>
                <view style="flex:1;position: relative;margin:auto;">
                  <img
                    :src="v.img"
                    alt
                    style="width:100rpx;height:100rpx;top: 0;right: 0;bottom: 0;left: 0;margin: auto;"
                  />
                </view>
                <view style="flex:3.1;">
                  <view v-text="v.schoolclazzschedule.schoolclazz.name" class="index-text"></view>

                  <view style="display:flex;" class="text-color-939393">
                    <view style="flex:1.1;">{{v.schoolclazzschedule.schoolclasstime}}</view>
                    <view
                      style="flex:1;text-align:center;"
                    >{{v.schoolclazzschedule.schoolclassroom.name}}</view>
                  </view>
                </view>
              </view>
            </div>
          </div>
        </i-tab>
      </i-tabs>
    </header>
  </view>
</template>

<script>
import a from './a.js'
export default a
</script>

